<template>
  <Panel title="报警记录列表" width="380px">
    <div class="level-info">低<level width="22px" height="12px" />高</div>

    <div class="list">
      <div class="list-item">
        <level direction="vertical" :value="1" gap="2px" width="6px" height="6px" />
        <div class="list-content">
          <div class="title">
            摄像设备
            <div class="subtitle">A0012</div>
          </div>
          <div>2楼103号消防栓损坏</div>
          <div>2021/05/15 19:55</div>
          <div><Icon name="map-filling" :size="20" :color="'#2F80ED'"></Icon></div>
        </div>
      </div>
      <div class="list-item">
        <level direction="vertical" :value="1" gap="2px" width="6px" height="6px" />
        <div class="list-content">
          <div class="title">
            摄像设备
            <div class="subtitle">A0012</div>
          </div>
          <div>2楼103号消防栓损坏</div>
          <div>2021/05/15 19:55</div>
          <div><Icon name="map-filling" :size="20" :color="'#2F80ED'"></Icon></div>
        </div>
      </div>
      <div class="list-item">
        <level direction="vertical" :value="5" gap="2px" width="6px" height="6px" />
        <div class="list-content danger">
          <div class="title">
            摄像设备
            <div class="subtitle">A0012</div>
          </div>
          <div>2楼103号消防栓损坏</div>
          <div>2021/05/15 19:55</div>
          <div><Icon name="map-filling" :size="20" :color="'#FF0000'"></Icon></div>
        </div>
      </div>
    </div>
  </Panel>
</template>

<script lang="ts" setup>
import level from "./level.vue";
</script>
<style lang="scss" scoped>
.level-info {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 16px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  .list-item {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
    gap: 2px;
    color: #ffffff;
    font-size: 12px;
    .title {
      font-size: 16px;
      font-weight: 400;
      color: var(--primary-color);
    }
    .subtitle {
      font-size: 10px;
      color: #ffffff;
    }
  }
  .list-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    width: 100%;
    background-color: #66d4ff20;
    padding: 1px 4px;
  }

  .danger {
    background-color: #ff000020;
    border: 1px solid var(--danger-color);
    .title{
      color: var(--danger-color);
    }
  }
}
</style>
